#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "sha256.h"

int main()
{
    uchar digest[SHA256_DIGEST_SIZE] = {0};
    uchar buf[1024] = {0};;
    sha256_ctx_t ctx;

    sha256_init(&ctx);
    sha256_update(&ctx, buf, sizeof(buf));
    sha256_final(&ctx, digest, SHA256_DIGEST_SIZE);

    for (int i = 0; i < SHA256_DIGEST_SIZE; ++i)
    {
        printf("%02x", digest[i]);
    }

    return 0;
}